/**
 * 作者: hwp
 * 日期: 2025-05-14 09:17:46
 * 备注: 用户联盟宝箱
 */
package com.motu.monstercity.server.game.userdata;

import com.motu.vertx.module.utility.toolset.TimeUtils;

public class UserUnionBox extends UserUnionBoxModel {
    public UserUnionBox() {
        super();
    }

    public UserUnionBox(long userId, int boxId, int boxNum) {
        putId(userId);
        putReceiveBoxId(boxId);
        putReceiveBoxNum(boxNum);
        putReceiveActiveBoxNum(0);
        putResetTime(TimeUtils.getCurTime());
    }

    public void reset() {
        if (!TimeUtils.isToday(resetTime)) {
            putResetTime(TimeUtils.getCurTime());
            putReceiveActiveBoxNum(0);
            update();
        }

    }
}
